package cn.yj.wx.pay.enrity;

import java.util.StringJoiner;

/**
 * @author 永健
 * @since 2021-09-23 10:34
 */
public class AppPayOrderResult extends PayOrderResult {
    /**
     * 调起支付关键信息
     */
    private Payment payment;


    public Payment getPayment() {
        return payment;
    }

    public AppPayOrderResult setPayment(Payment payment) {
        this.payment = payment;
        return this;
    }


    public static class Payment {
        private String appid;
        private String partnerid;
        private String prepayid;
        private String packageStr="Sign=WXPay";
        private String timeStamp;
        private String nonceStr;
        private String sign;

        public String getAppid() {
            return appid;
        }

        public Payment setAppid(String appid) {
            this.appid = appid;
            return this;
        }

        public String getPartnerid() {
            return partnerid;
        }

        public Payment setPartnerid(String partnerid) {
            this.partnerid = partnerid;
            return this;
        }

        public String getPrepayid() {
            return prepayid;
        }

        public Payment setPrepayid(String prepayid) {
            this.prepayid = prepayid;
            return this;
        }

        public String getPackageStr() {
            return packageStr;
        }

        public Payment setPackageStr(String packageStr) {
            this.packageStr = packageStr;
            return this;
        }

        public String getTimeStamp() {
            return timeStamp;
        }

        public Payment setTimeStamp(String timeStamp) {
            this.timeStamp = timeStamp;
            return this;
        }

        public String getNonceStr() {
            return nonceStr;
        }

        public Payment setNonceStr(String nonceStr) {
            this.nonceStr = nonceStr;
            return this;
        }

        public String getPaySign() {
            return sign;
        }

        public Payment setPaySign(String paySign) {
            this.sign = paySign;
            return this;
        }

        @Override
        public String toString() {
            return new StringJoiner(", ", Payment.class.getSimpleName() + "[", "]").add("appid='" + appid + "'").add(
                    "partnerid='" + partnerid + "'").add("prepayid='" + prepayid + "'").add("packageStr='" + packageStr + "'").add("timeStamp='" + timeStamp + "'").add("nonceStr='" + nonceStr + "'").add("paySign='" + sign + "'").toString();
        }
    }
}
